//package com.springvision.core.tcpclient;
//
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.ChannelPipeline;
//import io.netty.channel.socket.SocketChannel;
//import io.netty.handler.codec.string.StringDecoder;
//import io.netty.handler.codec.string.StringEncoder;
//import io.netty.handler.logging.LogLevel;
//import io.netty.handler.logging.LoggingHandler;
//import io.netty.handler.timeout.IdleStateHandler;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Lazy;
//import org.springframework.context.annotation.PropertySource;
//import org.springframework.stereotype.Component;
//
//import java.util.concurrent.TimeUnit;
//
//@Component
//@Lazy(false)
//@Qualifier("clientChannelInitializer")
//@PropertySource("classpath:properties/SystemConfig.properties")
//public class ClientChannelInitializer extends ChannelInitializer<SocketChannel> {
//
//	@Value("${READER_IDLE}")
//	private long READER_IDLE;
//
//	@Value("${WRITER_IDLE}")
//	private long WRITER_IDLE;
//
//	@Value("${ALL_IDLE}")
//	private long ALL_IDLE;
//
////	@Autowired
////	private LogicClientHandler logicClientHandler;
//
//	@Override
//	protected void initChannel(SocketChannel socketChannel) throws Exception {
//		ChannelPipeline p = socketChannel.pipeline();
//
////		p.addLast("idleStateHandler", new IdleStateHandler(READER_IDLE, WRITER_IDLE, ALL_IDLE, TimeUnit.MILLISECONDS));
////		p.addLast("logging", new LoggingHandler(LogLevel.INFO));
//
//		// p.addLast("framer", new DelimiterBasedFrameDecoder(1024, Delimiters.lineDelimiter()));
//
//		// p.addLast(new SmartCarEncoder());
//		// p.addLast(new SmartCarDecoder());
//
//		p.addLast("decoder", new StringDecoder());
//		p.addLast("encoder", new StringEncoder());
//
////		p.addLast(logicClientHandler);
//	}
//}